package com.xian.d7_abstract_test;

public class GoldCard extends Card{
    @Override
    public void pay(double money) {
        System.out.println("您当前消费:"+money);
        System.out.println("您卡片当前余额:"+getMoney());

        //优惠价:
        double res = money * 0.8;
        System.out.println(getUserName()+"您实际支付:"+res);
        //更新账户余额
        setMoney(getMoney() - res);
    }
}
